#pragma once

#include "imemoryallocator.h"

namespace PILO 
{
    namespace Core
    {
        namespace Memory 
        {

            class CHeapAllocator : public IMemoryAllocator 
            {
            public:
                CHeapAllocator() {}
                ~CHeapAllocator() {}

                void* alloc(int size) 
                {
                    return ::MemoryAlloc(size);
                }

                BOOL free(void* p)
                {
                    MemoryFree(p);
                    return TRUE;
                }

                size_t unitSize() const
                {
                    return 0;
                }

                void clear()
                {
                    return;
                }
            };
        }
    }    
}
